#include<stdio.h>
int main()
{
	int a,b,n,i;
	for (int i = 100; i < 1000; i++)
	{
		n = i, b = 0;
		while (n != 0)
		{
			a = n % 10;
			b += a*a*a;
			n = n / 10;
		}
		if (b == i) {
			printf("%d\n", i);
		}
	}
		return 0;
	}